</head>
<body>

<div>CashBook Of {{start_date}} to {{end_date}}
<h3> <center>DEBIT</h3>
<table border='1' width='100%'>
	<tr>
		<th>Sr.No </th>
		<th>Receipt No.</th>
		<th>Date</th>
		<th>Name of Parties</th>
		<th>Mode of Payment</th>
                <th>TDS</th>
		<th>Balance</th>
	</tr>
{% if client %}
    {% for clients in client %}
    {% for testtotals in testtotal %}
          {% if clients.id == testtotals.job_id %}
         <tr>
			<td>{{forloop.counter}}</td>
			<td>{{ clients.job_no }}</td>
			<td> {{ clients.date }}</td>
			<td> {{clients.client__client__first_name}}</td>
			<td>{{clients.pay}}</td>
                        <td ALIGN="right"></td>
		        <td ALIGN="right">{{testtotals.unit_price}}</td>
		
		</tr>
       		{% endif  %}
        {% endfor %}
        {% endfor %}
{% endif  %}
	<tr>
         <td colspan='6'><b><center>SUM</center></td>
        
         <td ALIGN="right"><b>{{total}}</td>
        </tr><br/>
	<tr>
         <th colspan='4'><center>Payee Name</center></th>
        
         <th colspan='2'>Amount payed</th>
	
	<th >total</th>
        </tr>
	<tr>
         
        <td colspan='4'><center>{{name1}}, {{name2}}, {{name3}}, {{name4}}, {{name5}}</center></td>
         
	<td colspan='2'><center>{{amount1}},{{amount2}},{{amount3}},{{amount4}},{{amount5}}</td>
	<td ALIGN="right">{{sumamt}}</td>
        </tr>
	
	<tr>
         <td colspan='6'><center>Balance Left</center></td>
        
         <td ALIGN="right">{{balance}}</td>
        </tr>
     
</table><br /><br /> <h3> <center>CREDIT</h3>
<table border='1' width='100%'>
	<tr>
		<th>Sr.No </th>
		<th>Receipt No.</th>
		<th>Date</th>
		<th>Name of Parties</th>
		<th>Mode of Payment</th>
		<th>Cheque/DD No. </th>
		<th>Cheque/DD date</th>
                <th>TDS</th>
		<th>Balance</th>
	</tr>
	{% if chequeclient %}
    {% for clients in chequeclient %}
    {% for testtotals in testtotal %}
          {% if clients.job_no == testtotals.job_no %}
         <tr>
			<td>{{forloop.counter}}</td>
			<td>{{ clients.job_no }}</td>
			<td> {{ clients.date }}</td>
			<td> {{clients.client__client__first_name}}</td>
			<td>{{clients.pay}}</td>
			<td>{{clients.check_number}}</td>
			<td>{{clients.check_dd_date}}</td>
                        <td ALIGN="right"></td>
		        <td ALIGN="right">{{testtotals.unit_price}}</td>
		
		</tr>
       		{% endif  %}
        {% endfor %}
        {% endfor %}
{% endif  %}
	<tr>
         <td colspan='8'><b><center>SUM</center></td>
        
         <td ALIGN="right"><b>{{net_total}}</td>
        </tr><br/>
</table>
<br></br></br></br>
</div>

</body>
